package com.weiyuwqj.server.service.sys.impl;

import com.github.pagehelper.PageHelper;
import com.weiyuwqj.server.service.base.BaseServiceImpl;
import com.weiyuwqj.server.mapper.SysSiteMapper;
import com.weiyuwqj.api.service.SysSiteService;
import com.weiyuwqj.api.common.PageList;
import com.weiyuwqj.api.common.Paginator;
import com.weiyuwqj.api.model.SysSite;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * Created by Administrator on 2015/12/11.
 */
@Service("siteService")
public class SysSiteServiceImpl extends BaseServiceImpl<SysSite> implements SysSiteService{

    @Autowired
    SysSiteMapper siteMapper;

    @Override
    public PageList getList(Paginator p,Map<String, Object> param) {
        PageHelper.startPage(p.getPageNum(), p.getPageSize());
        return new PageList(siteMapper.getList(param));
    }
}
